package leetcode.code022;

import java.util.List;

import leetcode.IDebug;
import leetcode.helper.HelpDebug;

public abstract class Solution022 implements IDebug {

	public abstract List<String> generateParenthesis(int n);

//	示例 1：
//	输入：n = 3
//	输出：["((()))","(()())","(())()","()(())","()()()"]
//
//	示例 2：
//	输入：n = 1
//	输出：["()"]

	@Override
	public void debug1() {
		int n = 3;
		String expect = "[\"((()))\",\"(()())\",\"(())()\",\"()(())\",\"()()()\"]";
		this.debug(n, expect);
	}

	private void debug(int n, String e) {
		List<String> result = this.generateParenthesis(n);
		List<String> expect = HelpDebug.str2liststr(e);
		HelpDebug.compare(expect, result);
	}

	@Override
	public void debug2() {
		int n = 1;
		String expect = "[\"()\"]";
		this.debug(n, expect);
	}

	@Override
	public void debug3() {
		// TODO Auto-generated method stub

	}

	@Override
	public void debug4() {
		// TODO Auto-generated method stub

	}

}
